//
//  flags.h
//  Tetravex
//
//  Created by Holmes Futrell on 7/13/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

#import <OpenGLES/ES1/gl.h>

#import "GLTexture.h"

@interface GLSprite : NSObject {

	GLfloat *vertices;
	GLfloat *texCoords;
	
	GLTexture *texture;
	
}

+(id)spriteWithContentsOfFile:(NSString *)path;
+(id)spriteWithContentsOfFile:(NSString *)path  flags:(int)flags;

-(id)initWithContentsOfFile:(NSString *)path;
-(id)initWithContentsOfFile:(NSString *)path flags:(int)centerMode;
-(id)initWithPVRTC:(NSString *)path size:(unsigned int)size bpp:(unsigned int)bpp flags:(unsigned int)flags;
-(id)initWithSize:(CGSize)size flags:(int)flags;

-(void)draw;

@property (readonly) GLuint width, height, internalWidth, internalHeight, descriptor;

@end

extern void drawRect(CGRect src, CGRect dst, GLSprite *sprite);
